package com.github.chen.demo;

import com.github.chen.demo.mapper.Neo4jDemoMapper;
import com.github.chen.orm.annotation.CypherScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@CypherScan("com.github.chen.demo.mapper")
public class GeneralOrmApplication {

    public static void main(String[] args) {
        SpringApplication application = new SpringApplicationBuilder().parent(GeneralOrmApplication.class).build(args);
        ConfigurableApplicationContext context = application.run(args);
        Neo4jDemoMapper proxy = context.getBean(Neo4jDemoMapper.class);
        proxy.queryById(1);
    }
}
